import numpy.core.multiarray
import cv2
import time

cam = cv2.VideoCapture(2)
cam.set(3, 1280)
cam.set(4, 720)
# cv2.namedWindow("test", cv2.WINDOW_GUI_NORMAL)
cv2.namedWindow("test")
# cv2.setWindowProperty('test', cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN)

# frame_rate = 10
# prev = 0


if __name__ == '__main__':
    while True:
        # time_elapsed = time.time() - prev

        rec, frame = cam.read()
        cv2.imshow("test", frame)

        k = cv2.waitKey(5)
        if k % 256 == 27:
            # ESC pressed
            print("Escape hit, closing...")
            break
